package com.eu.ebpm.engine.entity.history;

import java.util.Date;

import com.eu.ebpm.engine.entity.BaseEntity;
import com.eu.ebpm.engine.entity.enumm.TaskStatus;
import com.eu.ebpm.engine.pvm.EngineServiceType;

public class HisTask extends BaseEntity {

	private EngineServiceType type;
	
	private String name;
	
	private String desc;
	
	private String transferName;
	
	private String transferDesc;
	
	private long executionId;
	
	private Long rootExecutionId;
	
	private long missionId;
	
	private String assignee;
	
	private Date assigneeTime;
	
	private Integer status;
	
	private Date createTime;
	
	private Date dueTime;
	
	private String remark;

	public HisTask() {}

	public HisTask(EngineServiceType type, String name, String desc, String transferName,
			long executionId, Long rootExecutionId, long missionId, String assignee, Date assigneeTime,
			Date createTime, Date dueTime) {
		this.initId();
		this.status = TaskStatus.SUCCESS.getCode();
		this.type = type;
		this.name = name;
		this.desc = desc;
		this.transferName = transferName;
		this.executionId = executionId;
		this.rootExecutionId = rootExecutionId;
		this.missionId = missionId;
		this.assignee = assignee;
		this.assigneeTime = assigneeTime;
		this.createTime = createTime;
		this.dueTime = dueTime;
	}
	
	public HisTask(long id, EngineServiceType type, String name, String desc, String transferDesc, 
			long executionId, Long rootExecutionId, long missionId, String assignee, Date assigneeTime,
			Date createTime, Date dueTime, String remark, Integer status) {
		this.id = id;
		this.type = type;
		this.name = name;
		this.desc = desc;
		this.transferDesc = transferDesc;
		this.executionId = executionId;
		this.rootExecutionId = rootExecutionId;
		this.missionId = missionId;
		this.assignee = assignee;
		this.assigneeTime = assigneeTime;
		this.createTime = createTime;
		this.dueTime = dueTime;
		this.remark = remark;
		this.status = status;
	}
	
//	public HisTask(long id, String transferName, String transferDesc, Date dueTime, String remark, Integer status, String assignee, Date assigneeTime) {
//		this.id = id;
//		this.transferName = transferName;
//		this.transferDesc = transferDesc;
//		this.dueTime = dueTime;
//		this.remark = remark;
//		this.status = status;
//		this.assignee = assignee;
//		this.assigneeTime = assigneeTime;
//	}

	public EngineServiceType getType() {
		return type;
	}

	public void setType(EngineServiceType type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public long getExecutionId() {
		return executionId;
	}

	public void setExecutionId(long executionId) {
		this.executionId = executionId;
	}

	public Long getRootExecutionId() {
		return rootExecutionId;
	}

	public void setRootExecutionId(Long rootExecutionId) {
		this.rootExecutionId = rootExecutionId;
	}

	public long getMissionId() {
		return missionId;
	}

	public void setMissionId(long missionId) {
		this.missionId = missionId;
	}

	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}

	public Date getAssigneeTime() {
		return assigneeTime;
	}

	public void setAssigneeTime(Date assigneeTime) {
		this.assigneeTime = assigneeTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getDueTime() {
		return dueTime;
	}

	public void setDueTime(Date dueTime) {
		this.dueTime = dueTime;
	}

	public String getTransferDesc() {
		return transferDesc;
	}

	public void setTransferDesc(String transferDesc) {
		this.transferDesc = transferDesc;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getTransferName() {
		return transferName;
	}

	public void setTransferName(String transferName) {
		this.transferName = transferName;
	}

	@Override
	public String toString() {
		return "HisTask [type=" + type + ", name=" + name + ", desc=" + desc + ", transferDesc=" + transferDesc + ", executionId=" + executionId + ", rootExecutionId="
				+ rootExecutionId + ", missionId=" + missionId + ", assignee=" + assignee + ", assigneeTime=" + assigneeTime + ", createTime=" + createTime + ", dueTime="
				+ dueTime + ", remark=" + remark + "]";
	}
	
}
